This invention relates to a look-up table constructing method to be used, for example, when forming and outputting a copy of an input color image, and a color conversion apparatus using the method.
In a color image processing system, color data input from an image input device, and color data output to an image output device is greatly influenced by the characteristics of the input and output devices. To eliminate such a difference in characteristics between the input and output devices, color conversion from input color data to output color data is implemented, using maps in different color spaces.
Suppose that input color pixel values Ri, Gi and Bi from a scanner are converted into output color pixel values Co, Mo and Yo to be output to a printer, using an RGB color system as an original color space, and a CMY color system as a destination color space. This conversion can be realized by a color conversion method using a matrix operation, which is expressed by, for example, the following formula (1) or (2):                               [                                                                      C                  0                                                                                                      M                  0                                                                                                      Y                  0                                                              ]                =                              [                                                                                a                    00                                                                                        a                    01                                                                                        a                    02                                                                                                                    a                    10                                                                                        a                    11                                                                                        a                    12                                                                                                                    a                    20                                                                                        a                    21                                                                                        a                    22                                                                        ]                    ⁡                      [                                                                                R                    i                                                                                                                    G                    i                                                                                                                    B                    i                                                                        ]                                              (        1        )                                          [                                                                      C                  0                                                                                                      M                  0                                                                                                      Y                  0                                                              ]                =                              [                                                                                a                    00                                                                                        a                    01                                                                                        a                    02                                                                                        a                    03                                                                                        a                    04                                                                                        a                    05                                                                                        a                    06                                                                                        a                    07                                                                                        a                    08                                                                                        a                    09                                                                                                                    a                    10                                                                                        a                    11                                                                                        a                    12                                                                                        a                    13                                                                                        a                    14                                                                                        a                    15                                                                                        a                    16                                                                                        a                    17                                                                                        a                    18                                                                                        a                    19                                                                                                                    a                    20                                                                                        a                    21                                                                                        a                    22                                                                                        a                    23                                                                                        a                    24                                                                                        a                    25                                                                                        a                    26                                                                                        a                    27                                                                                        a                    28                                                                                        a                    29                                                                        ]                    ⁡                      [                                                                                R                    i                                                                                                                    G                    i                                                                                                                    B                    i                                                                                                                    R                    i                    2                                                                                                                    G                    i                    2                                                                                                                    B                    i                    2                                                                                                                                          R                      i                                        ⁢                                          G                      i                                                                                                                                                              G                      i                                        ⁢                                          B                      i                                                                                                                                                              B                      i                                        ⁢                                          R                      i                                                                                                                    1                                                      ]                                              (        2        )            
To obtain the output color pixel values Co, Mo and Yo from the input color pixel values Ri, Gi and Bi, using the color conversion processing section, there is another method wherein a look-up table (LUT) as shown in FIG. 12, which is constructed in advance using a matrix operation expressed by the formula (1) or (2), is referred to, instead of executing the matrix operation.
The LUT used in the method is constituted of multi-dimensional coordinate values (lattice points) in the original color space and corresponding multi-dimensional coordinate values (lattice points) in the destination color space. If the color pixel values Ri, Gi and Bi input to the color conversion processing section exist as values of an original pixel in the LUT, output pixel values Co, Mo and Yo as conversion results can be obtained directly from the LUT. If, on the other hand, the color pixel values Ri, Gi and Bi input to the color conversion processing section do not exist as values of an original pixel in the LUT, conversion from the input pixel values to output pixel values is performed by interpolation or extrapolation using a point of pixel values existing in the LUT.
However, it is difficult to sufficiently reflect non-linear characteristics in color space conversion by uniformly executing the matrix operation over the entire color space.
In light of this, there is a method in which a plurality of conversion matrices are prepared in advance, and the matrix operation is executed using one conversion matrix selected therefrom in accordance with pixel values Ri, Gi and Bi input to the color conversion processing section.
If in the conventional color conversion performed with reference to the LUT, the look-up table LUT to be referred to when color conversion is performed from a first color space (i.e. the original color space) to a second color space (i.e. the destination color space) is constructed using only one type of conversion matrix parameter, it is possible that there will be great differences between output pixel values and the original pixel values because of the non-linear correspondence between the original color space and the destination color space. In particular, it is possible that the hue will vary between the input pixel values and the output pixel values, which is a great disadvantage.
Moreover, in the aforementioned method using selected one of conversion matrices prepared in advance, a large amount of operation is executed since conversion matrix determining processing and the matrix operation are performed on each of the pixel values Ri, Gi and Bi input to the color conversion processing section. In addition, discontinuity of conversion matrices used in units of one pixel input to the color conversion processing section may degrade color reproductivity of an output color image. Executing an operation for correcting the reproductivity further increases the amount of the entire operation.
It is the object of the invention to provide a method for constructing a color conversion LUT that can reduce the amount of operation performed in color conversion processing, and can correctly reflect the non-linear characteristics in the correspondence between an original color space and a destination color space.
According to an aspect of the invention, there is provided a method of constructing a look-up table to be referred to when converting color information of a lattice point in a first color space, into color information of a lattice point in a second color space, comprising the steps of: defining first divided areas by dividing the first color space on the basis of a first color attribute selected from brightness, chroma and hue, using at least one optionally designated first reference value; defining second divided areas by dividing each of the first divided areas on the basis of a second color attribute selected from brightness, chroma and hue and different from the first color attribute, using at least one optionally designated second reference value; dividing each of the second divided areas into third divided areas on the basis of a color attribute selected from the brightness, chroma and hue and different from the first and second color attributes, using at least one optionally designated third reference value; calculating and providing an appropriate conversion matrix parameter for each of the third divided areas, the appropriate conversion matrix parameter being used to execute conversion from the first color space to the second color space; and constructing, using the provided conversion matrix parameters, a look-up table that indicates a correspondence relationship between lattice points in the first color space and lattice points in the second color space.
Thus, the first color space is divided into a plurality of areas on the basis of the brightness, chroma and hue of each lattice point, and an appropriate conversion parameter is calculated for each divided area. Accordingly, a conversion error which will occur when converting the pixel values of a lattice point from the first color space to the second color space can be minimized.
The step of defining the first divided areas includes the step of dividing the first color space into a plurality of areas such that an overlapping area is formed between adjacent divided areas; the step of calculating the appropriate conversion matrix parameter includes the step of calculating and providing appropriate conversion matrix parameters and weighting factors for those respective ones of the second divided areas, to which a target lattice point belongs; and the step of constructing the look-up table includes the step of calculating, when a plurality of conversion matrix parameters and weighting factors are provided for one target lattice point, a weighted mean of all color information items used in the second color space and corresponding to the one target lattice point, using the conversion matrix parameters and the weighting factors. Thus, inconsistency of the tone of reproduced color in the areas of the second color space can be further suppressed. In other words, the invention can construct a look-up table (LUT1) of a small conversion error.
According to another aspect of the invention, there is provided a color conversion apparatus for constructing a look-up table to be referred to when converting color information of a lattice point in a first color space, into color information of a lattice point in a second color space, and for converting color information in the first color space into color information in the second color space with reference to the constructed look-up table, comprising: first defining means for defining first divided areas by dividing the first color space on the basis of one of color attributes and at least one optionally designated first reference value; second defining means for defining second divided areas by dividing each of the first divided areas defined by the first defining means, on the basis of one of color attributes and at least one optionally designated second reference value; calculation means for calculating an appropriate conversion matrix parameter for each of the second divided areas defined by the second defining means, the appropriate conversion matrix parameter being used to execute conversion from the first color space to the second color space; LUT constructing means for constructing a look-up table for each of the second divided areas, using the calculated conversion matrix parameter; and means for converting color information in the first color space into color information in the second color space with reference to the look-up table constructed by the LUT constructing means.
Additional objects and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. The objects and advantages of the invention may be realized and obtained by means of the instrumentalities and combinations particularly pointed out hereinafter.